<include file="Public:header" />
<style>
.list-group .list-group {
	margin-bottom: -1px;
	margin-left: 0;
	margin-right: 0;
	padding: 0;
}
.list-group .list-group li {
	margin: 0;
	border: none;
}
.list-group {
	padding: 0 5px;
}
.list-group li {
	line-height: 2em;
	border-left: none;
	border-right: none;
	border-color: #F2F2F2;
	border-radius: 0 !important;
}
.list-group li a {
	display: block;
	font-size:1.1em;
}
.list-group li a .badge {
	float: right;
}
.list-group-item {
	padding: 5px 15px;
}
.list-group-item:first-child {
}
.media {
	padding: 10px;
	margin-top: 0px;
	background: #fff;
	margin-bottom: 4px;
}
.media p {
	margin-bottom: 0px;
}
.list-group-item:last-child {
}
.badge {
	background-color: transparent;
	color: #f00;
}
.headernav {
	display: none;
}
.panel-body {
	padding: 0;
}
.nav-glyphicons-list {
	display: table;
	width: 100%;
	padding-left: 0;
	list-style: none;
}
.nav-glyphicons li {
	display: table-cell;
	text-align: center;
 *display: inline-block;
 +float:left;
}
.nav-glyphicons li ul li {
	display: block;
}
.nav-glyphicons li a {
	display: inline-block;
	width: 100%;
	_width: auto;
	padding-top: 0.2em;
}
.nav-glyphicons .glyphicon-class {
	display: block;
	text-align: center;
	word-wrap: break-word
}
.nav-glyphicons .dropdown-menu {
	border-radius: 0;
	padding-top: 0;
	padding-bottom: 0;
}
.dropdown-menu {
	min-width: inherit;
}
.Mbutton .fa, .Mbutton .glyphicon {
	font-size: 20px;
	width: 40px;
	margin-bottom: 5px;
	height: 40px;
	border-radius: 30px;
	line-height: 40px;
	text-align: center;
}

.Mbutton .glyphicon-class{font-size:18px; font-weight:normal;}
.Mbutton {
	padding: 5px 0;
	background: #fff;
	margin-bottom: 3px;
}
.Bbutton {
	padding: 5px 0;
	background: #fff;
}
.DataList .list-group {
	display: none;
}

.DataList .list-group-item{margin-left:10px; margin-right:10px;}


.DataList .fa {
	color: #ff1c51;
}
.DataList .fa.fa-angle-right{color:#888888;}
.Aff_row {
	text-align: center;
	padding: 8px 0;
	border-bottom: 1px solid #b2b2b2;
}

.DataList li i.fa{width:30px; text-align:center;}

.Aff_row .fa {
	font-size: 18px;
}
</style>
<div class="media" style="background-image:url(/Public/ired.jpg); background-size:100% 100%; background-position:center right; background-repeat:no-repeat; background-color:#c6a8e3; color:#fff;">
  <div class="media-left media-middle"> <a href="#"> <img class="media-object" src="{$_SESSION['memberInfo']['img_url']}" width="60" style="border-radius:50px;" alt=""> </a> </div>
  <div class="media-body">
    <h4 class="media-heading">欢迎您：{$_SESSION['memberInfo']['nickname']}</h4>
    <p style="font-family:'微软雅黑';">ID:{$_SESSION['memberInfo']['id']}　<!--注册时间：{:date('Y-m-d', $_SESSION['memberInfo']['reg_time'])}--></p>
    <if condition="$parent_info">
      <p>您来自<span style="color:#fff;">
        <empty name="parent_info['nickname']">{$parent_info['username']}</empty>
        {$parent_info.nickname}</span>的推荐
        <neq name="LevelName" value="">【级别：{$LevelName}】</neq>
      </p>
      <else/>
      <p>您是创始人
        <neq name="LevelName" value="">【级别：{$LevelName}】</neq>
      </p>
    </if>
  </div>
  <eq name="userInfo['level']" value="0">
    <div class="alert alert-warning" role="alert" style="margin:0 5px 5px 5px; padding:5px; background:#fff; text-align:center; font-size:10px; margin-top:8px; color:#000; border:none;"> <a href="__APP__/"> 您还没有成为小伙伴哦，赶紧点击购物加入吧！</a> </div>
  </eq>
</div>
<div class="row Aff_row" style="padding:10px 20px;">
  <div class="col-xs-6" style="text-align:left;"> 累计收入<br>
    <span id="AffMCount_2" style="font-size:24px; font-family:'Gill Sans', 'Gill Sans MT', 'Myriad Pro', 'DejaVu Sans Condensed', Helvetica, Arial, sans-serif; color:#ff1c51"></span></div>
  <div class="col-xs-6" style="text-align:right; line-height:40px; height:40px;"><i class="fa fa-angle-right"></i></div>
</div>
<div class="nav-glyphicons Mbutton" style="margin-left:0; margin-right:0; padding:10px 0; font-family:Arial; border-bottom:8px solid #f2f2f2;">
  <ul class="nav-glyphicons-list" style="background-color:#fff">
    <li class=""><a href="##"><span class="" style="color:#8d8d8d;" aria-hidden="true">本月收入</span><span class="glyphicon-class">
      <if condition="$commission eq 0 ">0
        <else />
        {$commission}</if>
      </span></a></li>
      
      
      
      
    <li class=""><a href="##" style="border-left: 1px solid #ccc; border-right:1px solid #ccc;"><span class="" style="color:#8d8d8d;" aria-hidden="true">账号余额</span><span class="glyphicon-class">{$_SESSION['memberInfo']['money']}</span></a></li>
    
    
    
    
    
    
    
    <li class=""><a href="{:U('userlist')}"><span class="" style="color:#8d8d8d;" aria-hidden="true">我的秘粉</span><span class="glyphicon-class"><span class="badge" style="color:#000;" id="usercount"><img width="10" src="__PUBLIC__/loading.gif"></span></span></a></li>
  </ul>
</div>
<ul class="list-group DataList">













  <li class="list-group-item" style="border-top:none;"><a href="{:U('Order/index')}"><span class="badge" style="color:#000;"><i class="fa fa-angle-right"></i></span><i class="fa fa-file-text"></i>我的订单</a></li>
  <gt name="serviceCard" value="0">


<li class="list-group-item" style=""><a href="{:U('Index/serviceCard')}"><span class="badge" style="color:#000;"><i class="fa fa-angle-right"></i></span><i class="fa fa-file-text"></i>我的服务卡</a></li>

</gt>




<li class="list-group-item" style=""><a href="{:U('Order/savemoney')}"><span class="badge" style="color:#000;"><i class="fa fa-angle-right"></i></span><i class="fa fa-cny"></i>充值中心</a></li>




  <li class="list-group-item"><a href="{:U('Index/userlist')}"><span class="badge" style="color:#000;"><i class="fa fa-angle-right"></i></span><i class="fa fa-group"></i>我的秘粉</a></li>
  
  <li class="list-group-item"><a href="{:U('Index/userlistadv')}"><span class="badge" style="color:#000;"><i class="fa fa-angle-right"></i></span><i class="fa fa-group"></i>我的合伙人</a></li>
  
  
  
  
  
  
  <li class="list-group-item"><a href="{:U('Member_account_log/detailmes')}"><i class="fa fa-cny"></i>我的财富<span class="badge" style="color:#000;"><i class="fa fa-angle-right"></i></span></a></li>
  <li class="list-group-item"><a href="{:U('Member_account_log/divide')}"><i class="fa fa-arrow-circle-o-right"></i>我的推广<span class="badge" style="color:#000;"><i class="fa fa-angle-right"></i></span></a></li>
  <li class="list-group-item"><a href="##" id="createqrcode"><i class="fa fa-qrcode"></i>推广二维码<span class="badge" style="color:#000;"><i class="fa fa-angle-right"></i></span><span class="badge" id="createqrcode_" style="display:none;">正在生成，请稍等……</span></a></li>
  <li class="list-group-item"><a href="{:U('Aftermarket/index')}"><i class="fa fa-sign-out"></i>退货管理<span class="badge" style="color:#000;"><i class="fa fa-angle-right"></i></span></a></li>
  
  <li class="list-group-item"><a href="{:U('Coupon/index')}"><i class="fa fa-caret-right"></i> 优惠券</a></li>
  <li class="list-group-item"><a href="tel:{:getSysVal('phone')}"><i class="fa fa-phone"></i>客服电话 <span style="color:#ff2a5c;">{:getSysVal('phone')}</span></a></li>
  
</ul>
<gt name="userInfo['level']" value="0">
  <volist name="affdata" id="vo">
    <div class="panel panel-danger" style="margin:5px 5px 5px 5px;">
      <div class="panel-heading"><i class="glyphicon glyphicon-calendar"></i>{$vo.levelname}营业统计</div>
      <div class="panel-body">
        <div class="nav-glyphicons Bbutton" style="border-radius:8px;">
          <ul class="nav-glyphicons-list" style="background-color:#fff">
            <li class=""><a href=""><span class="" aria-hidden="true">{$vo.orderTotal}</span><span class="glyphicon-class">总营业额</span></a></li>
            <li class=""><a href=""><span class="" aria-hidden="true">{$vo.orderCount}</span><span class="glyphicon-class">订单数</span></a></li>
            <li class=""><a href=""><span class="" aria-hidden="true">{$vo.orderAffMoney}</span><span class="glyphicon-class">佣金</span></a></li>
          </ul>
        </div>
      </div>
    </div>
  </volist>
  <else/>
</gt>
<script>
    $(document).ready(function(e) {
		$('.DataList > .list-group-item').each(function(index, element) {
			$(this).click(function(e) {
                if($(this).next('ul.list-group').css('display') == 'block'){
					$(this).next('ul.list-group').hide();
				}else{
					$(this).next('ul.list-group').show();
				}
            });
            
			
        });
		
		
		
		$('#createqrcode').click(function(e) {
			$('#createqrcode_').html('<img width="10" src="__PUBLIC__/loading.gif">正在生成，请稍等……');
			$('#createqrcode_').show(200);
            $.post("{:U('createAffQrcode')}", {}, function(data){
				<gt name="userInfo['level']" value="0">
				$('#createqrcode_').html('已经发送到微信，请查收！');
				<else/>
				$('#createqrcode_').html(data);
				</gt>
				
				setTimeout(function(){
					$('#createqrcode_').hide();
				},2000);
			},'html');
        });
		
        $.post('{:U('userCount')}',{},function(data){
			$('#usercount').html(data+'人');
		},'html');
		
		$.post('{:U('Home/Ajax/getOrderAff')}',{'orderstatus':1,member_id:<?php echo $_SESSION['memberInfo']['id'];?>},function(data){
			$('#orderNoPay').html(data+'单');
		},'html');
		$.post('{:U('Home/Ajax/getOrderAff')}',{'orderstatus':2,member_id:<?php echo $_SESSION['memberInfo']['id'];?>},function(data){
			$('#orderPayed').html(data+'单');
		},'html');
		
		$.post('{:U('Home/Ajax/getOrderAff')}',{'orderstatus':'1,2',member_id:<?php echo $_SESSION['memberInfo']['id'];?>},function(data){
			$('#orderPayedc').html(data+'单');
		},'html');
		$.post('{:U('Home/Ajax/getMemberCount')}',{'deep':1,member_id:<?php echo $_SESSION['memberInfo']['id'];?>},function(data){
			$('#usercount1').html(data+'人');
		},'html');
        $.post('{:U('Home/Ajax/getMemberCount')}',{'deep':2,member_id:<?php echo $_SESSION['memberInfo']['id'];?>},function(data){
			$('#usercount2').html(data+'人');
		},'html');
		$.post('{:U('Home/Ajax/getMemberCount')}',{'deep':3,member_id:<?php echo $_SESSION['memberInfo']['id'];?>},function(data){
			$('#usercount3').html(data+'人');
		},'html');
		
		
		//我的奖励
		$.post('{:U('Home/Ajax/getAffData')}',{member_id:<?php echo $_SESSION['memberInfo']['id'];?>},function(data){
			$('#AffMCount_1').html('¥'+data.a);
			$('#AffMCount_2').html('¥'+data.b);
			$('#AffMCount_3').html('¥'+data.c);
			$('#AffMCount_4').html('¥'+data.d);
			$('#AffMCount_5').html('¥'+data.e);
			$('#AffMCount_6').html('¥'+data.f);
			$('#usercount_1').html('¥'+(data.g));
		},'json');
		
		
		
		
		
		
    });
</script> 
<include file="Public:footer" />